package mythread.demo001;

public class MyThread13 {

    private  String uname="a";
    private  String upwd="aa";

    public String getUname() {
        return uname;
    }

    public void setUname(String uname) {
        this.uname = uname;
    }

    public String getUpwd() {
        return upwd;
    }

    public void setUpwd(String upwd) {
        this.upwd = upwd;
    }

    synchronized public void pringStr(String name, String pwd) {
        try {
            uname = name;
            Thread.sleep(100000);
            upwd=pwd;
            System.out.println("uname=" + uname + ",upwd=" + upwd);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }

}
